/**
 * Created by Administrator on 2017/6/5.
 * @description loading请求加载
 */
const mShopLoading = weex.requireModule('customModal');


/**
 * @description 打开加载进度条
 * @param message
 */
const showLoading = function (message) {
    message = message || null;
    try {
        mShopLoading.showProgressDialog(message);
    } catch (e) {
        console.error('调用shop loading出错: ' + e);
    }
};


/**
 * @description 关闭记载进度条
 */
const hideLoading = function () {
    try {
        mShopLoading.dismissProgressDialog();
    } catch (e) {
        console.error('关闭shop loading异常:' + e);
    }
};


export default {
    showLoading, hideLoading
};